package com.zbkj.admin.task.product;

import com.zbkj.service.service.EbGroupBuyShopService;
import com.zbkj.service.service.EbGroupPurchaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component("GroupGoodsTask")
public class GroupGoodsTask {
    @Autowired
    private EbGroupPurchaseService ebGroupPurchaseService;
    @Autowired
    private EbGroupBuyShopService ebGroupBuyShopService;

    /**
     * 1分钟同步一次数据
     */
    public void goodsTask() {
        log.info("更新商品上下架状态");
        //更新商品状态
        ebGroupPurchaseService.setStatusTask();
    }
}
